package com.tangyuan.ai.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum AiExchangeStatusEnum {

    QUEUING("QUEUING","视频生成中"),
    PROCESSING("PROCESSING","视频生成中"),
    PROCESS_SUCCESS("PROCESS_SUCCESS","视频生成成功"),
    PROCESS_FAILED("PROCESS_FAILED","处理失败"),
    TIMEOUT_FAILED("TIMEOUT_FAILED","任务超时未处理完成"),
    LIMIT_RETRY_FAILED("LIMIT_RETRY_FAILED","超过最大重试次数"),
    EXPIRES("EXPIRES","视频已过期")
    ;

    private final String status;
    private final String statusStr;

    public static AiExchangeStatusEnum getEnum(String status){
        for (AiExchangeStatusEnum value : AiExchangeStatusEnum.values()) {
            if(value.status.equals(status)){
                return value;
            }
        }
        return EXPIRES;
    }
}
